fix: clone_remote 路由决策实际执行仓库克隆 - #114
Conversation
clone_remote 决策返回时,thread-context.ts 仅取 decision.workdir (对 clone_remote 为 undefined)回退到默认目录 /root/dev/, 从未调用 setupWorkspace 执行实际克隆。 修复: 检测到 clone_remote + repo_url 时,调用 setupWorkspace 通过 bare cache 克隆到隔离工作区,与 use_existing 的隔离逻辑对齐。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @lishuceo's task in 1m 47s —— View job PR Review: fix: clone_remote 路由决策实际执行仓库克隆
Review SummaryThe core fix is correct — Issues:
What's good:
|
address PR review feedback — 将 clone_remote / use_existing 的工作区 创建逻辑提取为共享 resolveWorkdir 函数,消除两处路由路径中的重复代码。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @lishuceo's task in 2m 1s —— View job PR Review: fix: clone_remote 路由决策实际执行仓库克隆
|
address PR review feedback — clone_remote 时将路由决策的 branch 字段传递给 setupWorkspace,支持指定分支克隆。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @lishuceo's task in 1m 24s —— View job PR Review: fix: clone_remote 路由决策实际执行仓库克隆
✅ Approved — All previous issues resolved2 previous issues fixed:
Remaining concern:
What's good:
|
* fix: clone_remote 路由决策实际执行仓库克隆 clone_remote 决策返回时,thread-context.ts 仅取 decision.workdir (对 clone_remote 为 undefined)回退到默认目录 /root/dev/, 从未调用 setupWorkspace 执行实际克隆。 修复: 检测到 clone_remote + repo_url 时,调用 setupWorkspace 通过 bare cache 克隆到隔离工作区,与 use_existing 的隔离逻辑对齐。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: 提取 resolveWorkdir 消除重复的工作区创建逻辑 address PR review feedback — 将 clone_remote / use_existing 的工作区 创建逻辑提取为共享 resolveWorkdir 函数,消除两处路由路径中的重复代码。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: 传递 decision.branch 到 setupWorkspace sourceBranch address PR review feedback — clone_remote 时将路由决策的 branch 字段传递给 setupWorkspace,支持指定分支克隆。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
thread-context.ts的路由结果处理中,clone_remote决策从未调用setupWorkspace执行实际克隆,导致工作目录回退到/root/dev/clone_remote+repo_url时,调用setupWorkspace通过 bare cache 克隆到隔离工作区根因: 话题
omt_1acd084a898f1c90中,路由正确返回clone_remote(repo_url: https://github.com/lishuceo/talktype),但代码取decision.workdir(对 clone_remote 为 undefined)直接回退默认目录,ensureIsolatedWorkspace对非 git 目录原样返回,最终工作目录变成了/root/dev/。Test plan
🤖 Generated with Claude Code